<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<!DOCTYPE html>
<!-- saved from url=(0034)http://192.168.0.77/pms/goal.html# -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/bootstrap.js"></script>
</head>
<body class="body">
	<jsp:include page="include/head.jsp">
		<jsp:param value="${ep}" name="ep"/>
	</jsp:include>
	<c:choose>
		<c:when test="${param.code == '1001' }">
			<script type="text/javascript">
				$(document).ready(function(){
					alert("删除目标成功！");
				});
			</script>
		</c:when>
		<c:when test="${param.code == '1002' }">
			<script type="text/javascript">
				$(document).ready(function(){
					alert("添加新目标成功！");
				});
			</script>
		</c:when>
		<c:when test="${param.code == '1003' }">
			<script type="text/javascript">
				$(document).ready(function(){
					alert("修改目标成功！");
				});
			</script>
		</c:when>
	</c:choose>
	
	<div class="container">
	  <div class="row">
		<div class="span3">
			<div style="padding: 8px 0;" class="well">
				<jsp:include page="include/nav.jsp">
					<jsp:param value="${ep}" name="ep"/>
					<jsp:param value="goal" name="tag"/>
					
				</jsp:include>
			</div>
		</div>
		<div class="span9">
			
			<div class="btn-group" style="float:right">
          		<a class="btn" href="#"><i class="icon-cog"></i>操作</a>
          		<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
          		<ul class="dropdown-menu">
            		<li><a href="goal.jspx?m=newGogal"><i class="icon-plus"></i>添加新目标</a></li>
            		<li><a href="task.jspx?m=findAllTasks&projectid=${ep.projectID }"><i class="icon-zoom-in"></i>浏览所有任务</a></li>
          		</ul>
        	</div>

			<div class="clear"></div>
			<c:if test="${fn:length(gogalList) == 0 }">
				<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
					<li>
						没有目标
					</li>
				</ul>
			</c:if>
			<c:forEach items="${gogalList}" var="gogal">
				<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
					<li>
						<a href="goal.jspx?m=goGoalAndTasks&id=${gogal.id}"><i class="icon-th"></i>目标名称：${gogal.name}</a>
						
					</li>
					<li style="float:right"><i class="icon-trash"></i><a href="goal.jspx?m=delGogal&gogalId=${gogal.id}" class="link-black">删除</a></li>
					<li style="float:right"><i class="icon-edit"></i><a href="goal.jspx?m=editGogal&gogalId=${gogal.id}" class="link-black" style="margin-right:30px;">编辑</a></li>
				</ul>
				<div class="wall" style="padding-bottom:20px;">
					<p>${gogal.desc}</p>
					<div class="progress ${gogal.rate == 100 ? 'progress-success':'progress-danger'}">
						<div class="bar" style="width: ${gogal.rate}%;">${gogal.rate == 0 ? '':'已完成'}${gogal.rate == 0 ? '':gogal.rate}${gogal.rate == 0 ? '':'%'}</div>
					</div>
					<span style="margin-right:50px;margin-bottom:10px;float:right;">创建时间：${gogal.createtime }</span>
				</div>
			</c:forEach>
		</div>
	  </div>
	</div>

</body></html>